package com.cc.myspringboot3.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName: SwaggerConfig
 * @Description:
 * @Author: 晓东√
 * @Date: 2024-09-24 21:11
 * @Version: 1.0
 **/
@Configuration
public class SwaggerConfig {

    @Bean
    public OpenAPI createRestApi() {
        return new OpenAPI()
                .info(apiInfo());
    }

    private Info apiInfo() {
        return new Info()
                .title("接口文档标题")
                .description("SpringBoot3 集成 Swagger3接口文档")
                .version("1.0");
    }
}
